package top.hcode.hoj.pojo.form;

import lombok.Data;

import javax.validation.constraints.AssertTrue;

/**
 * @author orangej
 * @since 2025/2/19
 */
@Data
public class AdmCollGetQuestionForm {
    private String id;
    private String collId;
    private Integer sortOrder;
    private String questionTypes;

    @AssertTrue(message = "参数错误")
    public boolean isValid() {
        if (id != null) {
            return true;
        }

        if (collId != null && sortOrder != null) {
            return true;
        }

        return false;
    }
}
